<template>
  <div>
    <el-dialog
      title="短链接二维码"
      :visible.sync="qrCodeDialog"
      width="20%"
      @close="close"
    >
      <vue-qr
        :text="codeText"
        :size="260"
        :margin="20"
        colorDark="#333"
        :logoSrc="lgoImg"
        logoScale="0.21"
        logoMargin="25px"
        :callback="getCode"
      ></vue-qr>
    </el-dialog>
  </div>
</template>

<script>
import VueQr from "vue-qr";
export default {
  name:'QR',
  components: { VueQr },
  props: {
    qrCodeDialog: {
      type: Boolean,
    },
  },
  data() {
    return {
      codeText: "https://blog.csdn.net/yuansusu_?spm=1000.2115.3001.53",
      // lgoImg: require("../assets/111.png"),
    };
  },
  methods: {
    close() {
      this.$emit("update:qrCodeDialog", false);
    },
     getCode(codeImg) {
      console.log('二维码图片', codeImg);
    },
  },
};
</script>

<style scoped></style>
